/*
 * @ProjectName: flutter_common
 * @Package: 
 * @ClassName: setting_language_model.dart
 * @Description: 设置语言
 * @User: Page.Su
 * @Date: 2020/8/27
 * @Time: 10:16
 * @UpdateDate: 2020/8/27 10:16
 */

import 'package:flutter_su/model/base_model.dart';
import 'package:json_annotation/json_annotation.dart';

part 'setting_language_model.g.dart';


@JsonSerializable()
class SettingLanguageModel extends Object with BaseModel{

  @JsonKey(name: 'data')
  Data data;

  @JsonKey(name: 'resultCode')
  int resultCode;

  @JsonKey(name: 'resultDesc')
  String resultDesc;

  SettingLanguageModel([this.data,this.resultCode,this.resultDesc,]);

  factory SettingLanguageModel.fromJson(Map<String, dynamic> srcJson) => _$SettingLanguageModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$SettingLanguageModelToJson(this);

  @override
  T toModel<T>(Map<String, dynamic> srcJson) {
    return SettingLanguageModel.fromJson(srcJson) as T;
  }

}


@JsonSerializable()
class Data extends Object {

  @JsonKey(name: 'X_Token')
  String xToken;

  Data(this.xToken,);

  factory Data.fromJson(Map<String, dynamic> srcJson) => _$DataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$DataToJson(this);

}


